package cn.wolf.other;

/**
 * 输出菱形
 */
public class XingXing {

    public static void main(String[] args) {
        xing(6);
    }

    public static void xing(int N) {
        for (int i = 1; i <= N; i++) {
            for (int x = 1; x <= N - i; x++) {
                System.out.print(" ");
            }
            for (int x = 1; x <= i * 2 - 1; x++) {
                System.out.print("*");
            }
            System.out.println();
        }
        for (int i = 1; i <= N - 1; i++) {
            for (int x = 1; x <= i; x++) {
                System.out.print(" ");
            }
            for (int x = 1; x <= 2 * N - 1 - 2 * i; x++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
